package com.parent.elasticsearch.old.result;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author yan
 * @date 2023/7/20 0020 22:45
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HitsNew<T> implements Serializable {

    private static final long serialVersionUID = -3127365477523251184L;
    /**
     * 索引
     */
    @JsonProperty(value = "_index", required = true)
    private String index;
    /**
     * 类型
     */

    @JsonProperty(value = "_type", required = true)
    private String type;
    /**
     * 返回实体主键
     */
    @JsonProperty(value = "_id", required = true)
    private String id;
    /**
     * 查询分数
     */
    @JsonProperty(value = "_score", required = true)
    private Double score;
    /**
     * 返回实体
     */
    @JsonProperty(value = "_source", required = true)
    private T source;
}